package com.jmlong.dao;

import com.jmlong.domain.Address;
import com.jmlong.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserDao {
    public User login(@Param("loginName") String loginName, @Param("passWord") String passWord);

    public Integer register(User user);

    public User repeat(String loginName);

    public User checkToken(User user);

    public Integer uploadProfilePicture(User user);

    public User getUserInfo(User user);

    public Integer addAddress(Address address);

    public Integer updateAddress(Address address);

    public Integer delAddressInfo(String id);

    public List<Address> getAddressInfo(String userId);


    public Integer userRemoval(User user);

    public Integer userRemovalCommodityStatus(String merchantID);

    public Integer updateInfo(User user);

    /**服务器专用接口查询**/
    public User getAll(String loginName);

    public User getUserInfoById(String id);

    public Address getAddressInfoById(String id);


}
